<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js在网页何处编写.js"></script>
</head>
<body>
  <script>
      alert("Hello World!");
  </script>
</body>
</html>